Advances in digital signal processing technology in recent years have made it possible to subject a large quantity of information, such as moving pictures, still images and voice, to high-efficiency digital encoding, and to record the encoded information on a small magnetic recording medium or small optical recording medium or send the encoded information to a communication medium. Such technology has undergone further expansion and an imaging apparatus capable of easily capturing high-quality video and outputting the video promptly to a communication medium has been developed.
The MPEG encoding technique is in wide use for the encoding of moving pictures at the present time. FIG. 4 illustrates an example of an imaging apparatus that uses the MPEG encoding technique. A video signal that has been captured by an image sensor 801 is supplied to an MPEG encoder 802. MPEG encoding employs intraframe encoding in which encoding is performed using correlation within the same frame, and interframe encoding in which encoding is performed using correlation between frames.
FIG. 5 is a diagram illustrating an example of the structure of encoded data that is output from the MPEG encoder 802. Reference numerals 910, 930 in FIG. 5 denote I pictures that have undergone intraframe encoding, and reference numerals 911 to 921 and 931 to 941 denote pictures that have undergone interframe encoding. These interframe-encoded pictures comprise P pictures, which are images that have undergone interframe predictive encoding in the forward direction, and B pictures, which are images that have undergone interframe predictive encoding bidirectionally. These pictures are output collectively in picture groups (GOP) 901 to 907 each having a prescribed number of pictures and classification. Each single picture group contains at least one I picture, and the interframe-encoded pictures are reproduced based upon the I-picture information.
The video thus encoded is supplied to a recording unit 803 and is stored on any recording medium 804. At the same time, the encoded video is supplied to a communication unit 805 and is transmitted to the exterior of the imaging apparatus from a stream output terminal 806. This imaging apparatus not only stores video on a recording medium but also can be used in various applications, such as in distribution of video and in TV telephones, by connecting the stream output terminal to a computer or television.
Consider a case where the start of recording on the recording medium 804 has been commanded via a control panel (not shown) while transmission of encoded data from the stream output terminal 806 is in progress in an imaging apparatus of this kind. For example, consider a case where start of recording has been commanded at the timing T in FIG. 5, i.e., at a timing that corresponds to picture 915 in the picture group 903.
In this case, data from the interframe-encoded picture 915 is stored on the recording medium 804 partway through the picture group 903. The picture groups shown in FIG. 5 are such that one I picture in each group is included at the leading end of the group. As a consequence, the intraframe-encoded I picture 910 is lost without being recorded in the picture group 903 from which recording started in mid course. This means that the interframe-encoded pictures 915 to 921 contained in the same frame cannot be decoded correctly despite the fact that they were recorded normally.
In this example of the prior art, therefore, a picture group that cannot be decoded correctly occurs with almost absolute certainty at the beginning of each unit of photography, and a problem which arises is that at the time of playback, the image freezes for a period of time corresponding to the leading picture group. In order to solve this problem, Japanese Patent No. 3163700 (JP-B-3163700, corresponding U.S. Pat. No. 5,774,624) proposes generating a picture group afresh from the record-start command and arranging it so that an I picture is always included in the leading picture group regardless of the timing at which recording is started.
With the technique described in the above-mentioned patent specification, the image that has been recorded on the recording medium can be reproduced correctly from the leading end. However, consider the encoded data that was being output from the MPEG encoder 802 to the stream output terminal. If recording was commanded partway through a picture group, now the picture group at the stream output will be split up. For example, there are instances where a P picture necessary to reproduce a B picture is lost. Thus, it has not been possible to produce an encoded output that can enable problem-free reproduction in terms of both recording and transmission.